<include file="Public/mobile_head"/><include file="./Addons/Shop/View/default/Index/base.html" />
<body>
<!--顶部通知
<div><img src="{:ADDON_PUBLIC_PATH}/images/temp/notice.jpg" style="width:100%; height:auto"><a href="#" class="btn_notice_close"></a></div>-->
<!--顶部搜索--> 
<include file="./Addons/Shop/View/default/Index/header.html" /> 
<!--END 顶部搜索 --> 

<!--底部导航--> 
<include file="./Addons/Shop/View/default/Index/footer.html" /> 
<!--END 底部导航-->
<section>
</section>
<section id="banner">
  <div class="m10 pr h" style="margin:0px;">
    <div class="swiper-wrapper h">
      <volist name ="banner_list" id="banner_list_vo">
        <div class="swiper-slide l"><a href="{$banner_list_vo.url}"><img src="{$banner_list_vo.image|get_cover_url}"></a></div>
      </volist>
      <!--
			<div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/0.jpg"></a></div>
			<div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/1.jpg"></a></div>
			<div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/2.jpg"></a></div>
        --> 
    </div>
    <div class="banner-pager w100p tc pa"></div>
  </div>
</section>
<!--
<section id="menu">
	<div class="mb10 mlr10 bgf">
		<ul class="w20">
			<li><a href=""><em><img src="{:ADDON_PUBLIC_PATH}/images/icon-m1.gif" alt="劲爆特惠"></em><br>劲爆特惠</a></li>
			<li><a href=""><em><img src="{:ADDON_PUBLIC_PATH}/images/icon-m2.gif" alt="精品收藏"></em><br>精品收藏</a></li>
			<li><a href=""><em><img src="{:ADDON_PUBLIC_PATH}/images/icon-m3.gif" alt="门店查询"></em><br>门店查询</a></li>
			<li><a href=""><em><img src="{:ADDON_PUBLIC_PATH}/images/icon-m4.gif" alt="订单状态"></em><br>订单状态</a></li>
			<li><a href=""><em><img src="{:ADDON_PUBLIC_PATH}/images/icon-m4.gif" alt="人工服务"></em><br>人工服务</a></li>
		</ul>
	</div>
</section>
-->
<section id="active">
  <div class="bgf">
    <ul class="w50">
      <volist name="topic_list" id="topic_list_vo">
        <li><a href="{:addons_url('Shop://Index/topic',array('id'=>$topic_list_vo['id']))}"><img src="{$topic_list_vo.image|get_cover_url}" alt="{$topic_list_vo.title}"></a></li>
      </volist>
    </ul>
  </div>
    <div style="width:95%;margin-left: auto;margin-right: auto;">
        <ul style="width:100%">
            <volist name="topic_list" id="topic_list_vo" >
                <li style="margin-bottom:3px;"><a href="{:addons_url('Shop://Index/topic',array('id'=>$topic_list_vo['id']))}"><img src="{$topic_list_vo.image|get_cover_url}" alt="{$topic_list_vo.title}"><div style="text-align: center;background-color: #079acc;color:#fff;">{$topic_list_vo.title}</div></a></li>
            </volist>
        </ul>
    </div>
</section>
<section id="hot" class="mt5">

   <h3 class="mt10" style="border-left-color:#{$shop_config.color}">店长推荐</h3>
  <div class="hot-bd">
    <div>
      <ul class="w50" >
        <volist name='list' id='list_vo'>
            <a href="{:addons_url('Shop://Index/productinfo',array('id'=>$list_vo['id']))}">
                <li><div class="fang_div" style="background-image: url({$list_vo['head_img']|get_cover_url})"></div>
                    <span class="hot_title">
                      <p class="tit_h">{$list_vo.name}</p>
                      <p class="price mt10">￥{$list_vo.true_price}</p>
                      <p class="oldprice">￥{$list_vo.old_price}</p>
                    </span>
                </li>
          </a> 
        </volist>
      </ul>
    </div>

  <h3 class="mt10" style="border-left-color:#{$shop_config.color}">店铺商品</h3>
  <div class="hot-bd">
    <div>
      <ul class="w50" id='plist'>
        <volist name='list' id='list_vo'> 
            <a href="{:addons_url('Shop://Index/productinfo',array('id'=>$list_vo['id']))}">
                <li><div class="fang_div" style="background-image: url({$list_vo['head_img']|get_cover_url})"></div>
                    <span class="hot_title">
                      <p class="tit_h">{$list_vo.name}</p>
                      <p class="price mt10">￥{$list_vo.true_price}</p>
                      <p class="oldprice">￥{$list_vo.old_price}</p>
                    </span>
                </li>
          </a> 
        </volist>
      </ul>
    </div>
      <div class="listloading" id = "loading">
          <if condition="$page.num gt 1">
              数据加载中...
          </if>
      </div>
  </div>
</section>
<!--
<section id="hot">
	<h3 class="tc">热卖商品</h3>
	<div class="hot-bd h">
            <div class="m10">
                <div class="swiper-wrapper h">
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/4.jpg"><span>￥99.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/5.jpg"><span>￥119.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/3.jpg"><span>￥99.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/6.jpg"><span>￥119.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/4.jpg"><span>￥99.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/5.jpg"><span>￥119.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/3.jpg"><span>￥99.00</span></a></div>
                    <div class="swiper-slide l"><a href="#"><img src="{:ADDON_PUBLIC_PATH}/upload/6.jpg"><span>￥119.00</span></a></div>
                </div>
            </div>
	</div>
</section>
-->
<!--底部 版权信息--> 
<include file="./Addons/Shop/View/default/Index/footerbq.html" /> 
<!--END 底部导航-->

<script src="{:ADDON_PUBLIC_PATH}/js/jquery.js"></script>
<script src="{:ADDON_PUBLIC_PATH}/js/swiper.js"></script>
<script src="{:ADDON_PUBLIC_PATH}/js/comm.js"></script>
<script>

var panelWidth = $(".fang_div").width(); 

$(".fang_div").height(panelWidth);

var banner=new Swiper('#banner .m10',{
	autoplay:2000,
	loop:true,
	pagination:'.banner-pager'
});
var hot=new Swiper('.hot-bd .m10',{
	slidesPerView:3
})

$(function(){
        var num = 2;
        var totlenum = {$page.num};
        var lock_load = false;
        $(window).scroll(function(){ 
            totalheight = parseFloat($(window).height()) + parseFloat($(window).scrollTop()); 
            if($(document).height() <= totalheight){
                if(totlenum>1 && totlenum>=num){
                    if(lock_load==false){
                        loadPage(num);
                    }
                }else if(totlenum !=1){
                    $('#loading').html('数据加载完毕');
                }
                
            } 
        });
        //关闭顶部提示信息
        $('.btn_notice_close').click(function(){
            $(this).parent().remove();
        })
        
        function loadPage(){
            lock_load = true;
                $('#loading').show();
                var jsondata='{"p":"'+num+'"}';
                jsondata=$.parseJSON(jsondata);
		$.ajax({
			url:"{:addons_url('Shop://Index/index')}",
			type:'POST',
			dataType:'json',
                        data:jsondata,
			success: function(data){
                            var html = '';
                            $(data).each(function(){
                                  html = html+'<a href="'+$(this)[0]['url']+'">'+
                                                '<li><div class="fang_div" style="background-image:url('+$(this)[0]['head_img']+')"></div><span class="hot_title">'+
                                                '<p class="tit_h">'+$(this)[0]['name']+'</p>'+
                                                '<p class="price mt10">￥'+$(this)[0]['true_price']+'</p>'+
                                                '<p class="oldprice">￥'+$(this)[0]['old_price']+'</p>'+
                                                '</span></li>'+
                                                '</a>';

//<img src="'+$(this)[0]['head_img']+'">
                                
                                 // html = html+'<li class="clear pr"><a href="'+$(this)[0]['url']+'" class="w80p db"><span class="image l mr10"><img src="'+$(this)[0]['head_img']+'" alt=""></span><p class="f1-2 pb10">'+$(this)[0]['name']+'</p><del class="c9">￥'+$(this)[0]['old_price']+'</del><p class="price f1-6 fb">￥'+$(this)[0]['true_price']+'</p><p class="c9">已售：'+$(this)[0]['sellnum']+'</p></a> <div class="btn pa"><a href="#" class="add2fav"><img src="{:ADDON_PUBLIC_PATH}/images/icon-fav.png" alt="收藏"></a><a href="#" class="add2car"><img src="{:ADDON_PUBLIC_PATH}/images/icon-car.png" alt="添加到购物车"></a></div></li>'
                            })
                            num = num + 1;
                            //$('#loading').hide();
                            $('#plist').append(html);
                            
                            $(".fang_div").height(panelWidth);
                            lock_load = false;
			},
			error:function(){
                            //$('#loading').hide();
                            //alert('数据加载失败');
                            lock_load=false;
			}
		})
	};
})
</script>
</body>
</html>